home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-12-18 | 8.1 KB | [ TEXT/MPS ]
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary ).
Confidence Program Detection Match Type Support
66%
dexvert
Compact Compressed (Unix) (archive/compact)
ext
Supported
10%
dexvert
MacBinary (archive/macBinary)
fallback
Supported
1%
dexvert
Text File (text/txt)
fallback
Supported
100%
file
MacBinary II, Sun Dec 18 12:31:53 1994, modified Sun Dec 18 12:31:53 1994, creator 'MPS ', type ASCII, 7652 bytes "ShowIcon7.c" , at 0x1e64 428 bytes resource
default (weak)
99%
file
data
default
74%
TrID
Macintosh plain text (MacBinary)
default
25%
TrID
MacBinary 2
default (weak)
100%
lsar
MacBinary
default
id metadata key value macFileType [ TEXT] macFileCreator [ MPS ]
hex view +--------+-------------------------+-------------------------+--------+--------+ |00000000| 00 0b 53 68 6f 77 49 63 | 6f 6e 37 2e 63 00 00 00 |..ShowIc|on7.c...| |00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......| |00000050| 00 00 00 00 00 1d e4 00 | 00 01 ac ab 1a 22 89 ab |........|....."..| |00000060| 1a 22 89 00 00 0a 00 00 | 00 00 00 00 00 00 00 00 |."......|........| |00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 6a 34 00 00 |........|....j4..| |00000080| 0d 2f 2a 20 49 66 20 79 | 6f 75 20 64 6f 6e 27 74 |./* If y|ou don't| |00000090| 20 64 65 66 69 6e 65 20 | 53 79 73 74 65 6d 53 69 | define |SystemSi| |000000a0| 78 4f 72 4c 61 74 65 72 | 2c 20 79 6f 75 20 77 69 |xOrLater|, you wi| |000000b0| 6c 6c 20 6e 65 65 64 20 | 74 6f 20 6c 69 6e 6b 20 |ll need |to link | |000000c0| 61 67 61 69 6e 73 74 20 | 2a 2f 0d 2f 2a 20 74 68 |against |*/./* th| |000000d0| 65 20 6c 69 62 72 61 72 | 79 20 76 65 72 73 69 6f |e librar|y versio| |000000e0| 6e 20 6f 66 20 53 79 73 | 45 6e 76 69 72 6f 6e 73 |n of Sys|Environs| |000000f0| 20 2a 2f 0d 0d 23 64 65 | 66 69 6e 65 20 53 79 73 | */..#de|fine Sys| |00000100| 74 65 6d 53 69 78 4f 72 | 4c 61 74 65 72 20 31 0d |temSixOr|Later 1.| |00000110| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 49 63 6f 6e 73 |.#includ|e <Icons| |00000120| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 4f 53 |.h>.#inc|lude <OS| |00000130| 55 74 69 6c 73 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |Utils.h>|.#includ| |00000140| 65 20 3c 52 65 73 6f 75 | 72 63 65 73 2e 68 3e 0d |e <Resou|rces.h>.| |00000150| 23 69 6e 63 6c 75 64 65 | 20 3c 4d 65 6d 6f 72 79 |#include| <Memory| |00000160| 2e 68 3e 0d 0d 2f 2a 0d | 09 53 68 6f 77 49 63 6f |.h>../*.|.ShowIco| |00000170| 6e 37 2e 63 0d 09 0d 09 | 53 68 6f 77 49 4e 49 54 |n7.c....|ShowINIT| |00000180| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 72 6f 75 74 | compati|ble rout| |00000190| 69 6e 65 20 74 68 61 74 | 20 73 68 6f 77 73 20 27 |ine that| shows '| |000001a0| 49 43 4e 23 27 20 61 6e | 64 20 27 69 63 6c 78 27 |ICN#' an|d 'iclx'| |000001b0| 20 66 6c 61 76 6f 72 20 | 69 63 6f 6e 73 2e 0d 09 | flavor |icons...| |000001c0| 46 6f 72 20 75 73 65 20 | 62 79 20 61 6c 6c 20 49 |For use |by all I| |000001d0| 4e 49 54 73 20 69 6e 20 | 53 79 73 74 65 6d 20 37 |NITs in |System 7| |000001e0| 20 61 6e 64 20 62 65 79 | 6f 6e 64 2e 0d 09 0d 09 | and bey|ond.....| |000001f0| 54 68 69 73 20 63 6f 64 | 65 20 69 73 20 62 61 73 |This cod|e is bas| |00000200| 65 64 20 6f 6e 20 50 61 | 74 72 69 63 6b 20 43 2e |ed on Pa|trick C.| |00000210| 20 42 65 61 72 64 27 73 | 20 53 68 6f 77 49 63 6f | Beard's| ShowIco| |00000220| 6e 46 61 6d 69 6c 79 0d | 09 62 79 20 50 61 74 72 |nFamily.|.by Patr| |00000230| 69 63 6b 20 43 2e 20 42 | 65 61 72 64 2c 20 77 68 |ick C. B|eard, wh| |00000240| 69 63 68 20 69 6e 20 74 | 75 72 6e 20 77 61 73 20 |ich in t|urn was | |00000250| 64 65 72 69 76 65 64 20 | 66 72 6f 6d 20 74 68 65 |derived |from the| |00000260| 0d 09 6f 72 69 67 69 6e | 61 6c 20 53 68 6f 77 49 |..origin|al ShowI| |00000270| 6e 69 74 20 62 79 20 50 | 61 75 6c 20 4d 65 72 63 |nit by P|aul Merc| |00000280| 65 72 2c 20 44 61 72 69 | 6e 20 41 64 6c 65 72 2c |er, Dari|n Adler,| |00000290| 0d 09 50 61 75 6c 20 53 | 6e 69 76 65 6c 79 2c 20 |..Paul S|nively, | |000002a0| 61 6e 64 20 53 74 65 76 | 65 20 43 61 70 70 73 2e |and Stev|e Capps.| |000002b0| 0d 09 0d 09 4d 6f 64 69 | 66 69 65 64 20 62 79 20 |....Modi|fied by | |000002c0| 4a 61 6d 65 73 20 57 2e | 20 57 61 6c 6b 65 72 20 |James W.| Walker | |000002d0| 66 6f 72 20 63 6f 6d 70 | 61 74 69 62 69 6c 69 74 |for comp|atibilit| |000002e0| 79 20 77 69 74 68 20 49 | 63 6f 6e 57 72 61 70 20 |y with I|conWrap | |000002f0| 31 2e 32 2c 0d 09 66 6f | 72 20 75 73 65 20 61 73 |1.2,..fo|r use as| |00000300| 20 61 20 73 65 70 61 72 | 61 74 65 20 63 6f 64 65 | a separ|ate code| |00000310| 20 72 65 73 6f 75 72 63 | 65 2c 20 61 6e 64 20 74 | resourc|e, and t| |00000320| 6f 20 75 73 65 20 74 68 | 65 20 6e 65 77 20 53 79 |o use th|e new Sy| |00000330| 73 74 65 6d 20 37 0d 09 | 69 63 6f 6e 2d 64 72 61 |stem 7..|icon-dra| |00000340| 77 69 6e 67 20 72 6f 75 | 74 69 6e 65 73 2e 20 20 |wing rou|tines. | |00000350| 54 68 69 73 20 63 6f 64 | 65 20 69 73 20 69 6e 20 |This cod|e is in | |00000360| 74 68 65 20 70 75 62 6c | 69 63 20 64 6f 6d 61 69 |the publ|ic domai| |00000370| 6e 2e 0d 09 0d 09 44 65 | 63 20 31 37 2c 20 31 39 |n.....De|c 17, 19| |00000380| 39 34 20 2d 20 4d 6f 64 | 69 66 69 65 64 20 74 6f |94 - Mod|ified to| |00000390| 20 77 6f 72 6b 20 77 69 | 74 68 20 4d 50 57 20 61 | work wi|th MPW a| |000003a0| 6e 64 20 75 6e 69 76 65 | 72 73 61 6c 20 68 65 61 |nd unive|rsal hea| |000003b0| 64 65 72 73 2e 0d 09 49 | 63 6f 6e 46 61 6d 69 6c |ders...I|conFamil| |000003c0| 69 65 73 2e 68 20 69 73 | 20 6e 6f 77 20 6f 66 66 |ies.h is| now off| |000003d0| 69 63 61 6c 6c 79 20 63 | 61 6c 6c 65 64 20 27 49 |ically c|alled 'I| |000003e0| 63 6f 6e 73 2e 68 27 2e | 20 51 44 47 6c 6f 62 61 |cons.h'.| QDGloba| |000003f0| 6c 73 0d 09 69 73 20 6e | 6f 77 20 61 6e 20 6f 66 |ls..is n|ow an of| |00000400| 66 69 63 69 61 6c 20 74 | 79 70 65 2e 20 52 65 6d |ficial t|ype. Rem| |00000410| 6f 76 65 64 20 69 6e 6c | 69 6e 65 20 61 73 73 65 |oved inl|ine asse| |00000420| 6d 62 6c 79 20 74 6f 20 | 72 6f 74 61 74 65 20 61 |mbly to |rotate a| |00000430| 0d 09 77 6f 72 64 20 6c | 65 66 74 2e 20 2d 2d 20 |..word l|eft. -- | |00000440| 43 68 61 72 6c 69 65 20 | 52 65 69 6d 61 6e 0d 09 |Charlie |Reiman..| |00000450| 0d 09 41 64 64 72 65 73 | 73 65 73 20 66 6f 72 20 |..Addres|ses for | |00000460| 4a 61 6d 65 73 20 57 2e | 20 57 61 6c 6b 65 72 3a |James W.| Walker:| |00000470| 20 37 36 33 36 37 2c 32 | 32 37 31 40 63 6f 6d 70 | 76367,2|271@comp| |00000480| 75 73 65 72 76 65 2e 63 | 6f 6d 20 6f 72 0d 09 09 |userve.c|om or...| |00000490| 77 61 6c 6b 65 72 6a 40 | 6d 61 74 68 2e 73 63 61 |walkerj@|math.sca| |000004a0| 72 6f 6c 69 6e 61 2e 65 | 64 75 0d 09 0d 09 49 6e |rolina.e|du....In| |000004b0| 73 74 72 75 63 74 69 6f | 6e 73 20 66 6f 72 20 75 |structio|ns for u| |000004c0| 73 65 3a 0d 09 0d 09 09 | a5 20 43 72 65 61 74 65 |se:.....|. Create| |000004d0| 20 61 20 66 61 6d 69 6c | 79 20 6f 66 20 69 63 6f | a famil|y of ico| |000004e0| 6e 73 20 77 69 74 68 20 | 52 65 73 45 64 69 74 20 |ns with |ResEdit | |000004f0| 32 2e 31 20 6f 72 20 6c | 61 74 65 72 2e 20 20 54 |2.1 or l|ater. T| |00000500| 68 69 73 20 77 69 6c 6c | 0d 09 09 09 69 6e 63 6c |his will|....incl| |00000510| 75 64 65 20 27 49 43 4e | 23 27 2c 20 27 69 63 6c |ude 'ICN|#', 'icl| |00000520| 34 27 2c 20 26 20 27 69 | 63 6c 38 27 20 69 63 6f |4', & 'i|cl8' ico| |00000530| 6e 73 2c 20 61 6c 6c 20 | 77 69 74 68 20 74 68 65 |ns, all |with the| |00000540| 0d 09 09 09 73 61 6d 65 | 20 72 65 73 6f 75 72 63 |....same| resourc| |00000550| 65 20 49 44 2e 0d 09 09 | 0d 09 09 54 6f 20 75 73 |e ID....|...To us| |00000560| 65 20 77 69 74 68 69 6e | 20 61 20 6c 61 72 67 65 |e within| a large| |00000570| 72 20 49 4e 49 54 20 70 | 72 6f 6a 65 63 74 3a 0d |r INIT p|roject:.| |00000580| 09 09 09 a5 20 23 64 65 | 66 69 6e 65 20 53 45 50 |.... #de|fine SEP| |00000590| 41 52 41 54 45 5f 43 4f | 44 45 20 30 20 20 62 65 |ARATE_CO|DE 0 be| |000005a0| 6c 6f 77 2e 0d 09 09 09 | a5 20 43 61 6c 6c 20 53 |low.....|. Call S| |000005b0| 68 6f 77 49 63 6f 6e 37 | 28 20 69 64 2c 20 61 64 |howIcon7|( id, ad| |000005c0| 76 20 29 20 77 69 74 68 | 20 74 68 65 20 72 65 73 |v ) with| the res| |000005d0| 6f 75 72 63 65 20 69 64 | 20 6f 66 0d 09 09 09 09 |ource id| of.....| |000005e0| 74 68 65 20 66 61 6d 69 | 6c 79 20 74 68 61 74 20 |the fami|ly that | |000005f0| 79 6f 75 20 75 73 65 64 | 2e 20 20 54 68 65 20 42 |you used|. The B| |00000600| 6f 6f 6c 65 61 6e 20 70 | 61 72 61 6d 65 74 65 72 |oolean p|arameter| |00000610| 20 61 64 76 0d 09 09 09 | 09 69 6e 64 69 63 61 74 | adv....|.indicat| |00000620| 65 73 20 77 68 65 74 68 | 65 72 20 79 6f 75 20 77 |es wheth|er you w| |00000630| 61 6e 74 20 74 68 65 20 | 6e 65 78 74 20 75 73 65 |ant the |next use| |00000640| 20 6f 66 20 53 68 6f 77 | 49 63 6f 6e 37 0d 09 09 | of Show|Icon7...| |00000650| 09 09 74 6f 20 61 64 76 | 61 6e 63 65 20 74 6f 20 |..to adv|ance to | |00000660| 61 20 6e 65 77 20 70 6f | 73 69 74 69 6f 6e 2e 20 |a new po|sition. | |00000670| 20 4e 6f 72 6d 61 6c 6c | 79 20 79 6f 75 20 70 61 | Normall|y you pa| |00000680| 73 73 20 54 52 55 45 2c | 0d 09 09 09 09 62 75 74 |ss TRUE,|.....but| |00000690| 20 79 6f 75 20 63 61 6e | 20 67 65 74 20 61 6e 20 | you can| get an | |000006a0| 61 6e 69 6d 61 74 65 64 | 2d 69 63 6f 6e 20 65 66 |animated|-icon ef| |000006b0| 66 65 63 74 20 62 79 20 | 70 61 73 73 69 6e 67 20 |fect by |passing | |000006c0| 46 41 4c 53 45 0d 09 09 | 09 09 61 6c 6c 20 65 78 |FALSE...|..all ex| |000006d0| 63 65 70 74 20 74 68 65 | 20 6c 61 73 74 20 74 69 |cept the| last ti| |000006e0| 6d 65 20 79 6f 75 20 63 | 61 6c 6c 20 53 68 6f 77 |me you c|all Show| |000006f0| 49 63 6f 6e 37 2e 0d 09 | 09 0d 09 09 54 6f 20 75 |Icon7...|....To u| |00000700| 73 65 20 61 73 20 61 20 | 73 65 70 61 72 61 74 65 |se as a |separate| |00000710| 20 63 6f 64 65 20 72 65 | 73 6f 75 72 63 65 3a 0d | code re|source:.| |00000720| 09 09 09 a5 20 23 64 65 | 66 69 6e 65 20 53 45 50 |.... #de|fine SEP| |00000730| 41 52 41 54 45 5f 43 4f | 44 45 20 31 20 20 62 65 |ARATE_CO|DE 1 be| |00000740| 6c 6f 77 2e 0d 09 09 09 | a5 20 53 65 74 20 74 68 |low.....|. Set th| |00000750| 65 20 70 72 6f 6a 65 63 | 74 20 74 79 70 65 20 74 |e projec|t type t| |00000760| 6f 20 63 6f 64 65 20 72 | 65 73 6f 75 72 63 65 2c |o code r|esource,| |00000770| 20 73 65 74 20 74 68 65 | 20 63 6f 64 65 20 74 79 | set the| code ty| |00000780| 70 65 0d 09 09 09 09 61 | 6e 64 20 72 65 73 6f 75 |pe.....a|nd resou| |00000790| 72 63 65 20 49 44 20 28 | 49 20 75 73 65 20 74 79 |rce ID (|I use ty| |000007a0| 70 65 20 27 43 6f 64 65 | 27 2c 20 49 44 20 2d 34 |pe 'Code|', ID -4| |000007b0| 30 34 38 20 66 6f 72 20 | 63 64 65 76 73 29 2c 0d |048 for |cdevs),.| |000007c0| 09 09 09 09 63 6f 6d 70 | 69 6c 65 20 61 6e 64 20 |....comp|ile and | |000007d0| 6d 65 72 67 65 20 69 6e | 74 6f 20 79 6f 75 72 20 |merge in|to your | |000007e0| 49 4e 49 54 20 6f 72 20 | 63 64 65 76 20 66 69 6c |INIT or |cdev fil| |000007f0| 65 2e 0d 09 09 09 09 53 | 65 74 20 74 68 65 20 72 |e......S|et the r| |00000800| 65 73 6f 75 72 63 65 20 | 74 79 70 65 20 74 6f 20 |esource |type to | |00000810| 4c 6f 63 6b 65 64 2c 20 | 73 6f 20 79 6f 75 20 77 |Locked, |so you w| |00000820| 6f 6e 27 74 20 68 61 76 | 65 0d 09 09 09 09 74 6f |on't hav|e.....to| |00000830| 20 63 61 6c 6c 20 48 4c | 6f 63 6b 20 77 68 65 6e | call HL|ock when| |00000840| 20 79 6f 75 20 75 73 65 | 20 69 74 2e 0d 09 09 09 | you use| it.....| |00000850| a5 20 49 6e 20 79 6f 75 | 72 20 6d 61 69 6e 20 49 |. In you|r main I| |00000860| 4e 49 54 20 63 6f 64 65 | 2c 20 63 61 6c 6c 20 53 |NIT code|, call S| |00000870| 68 6f 77 49 63 6f 6e 37 | 20 6c 69 6b 65 20 73 6f |howIcon7| like so| |00000880| 3a 0d 09 09 09 09 70 61 | 73 63 61 6c 20 76 6f 69 |:.....pa|scal voi| |00000890| 64 20 28 2a 53 68 6f 77 | 49 63 6f 6e 37 29 28 20 |d (*Show|Icon7)( | |000008a0| 73 68 6f 72 74 20 72 65 | 73 69 64 2c 20 42 6f 6f |short re|sid, Boo| |000008b0| 6c 65 61 6e 20 61 64 76 | 20 29 3b 0d 09 09 09 09 |lean adv| );.....| |000008c0| 48 61 6e 64 6c 65 20 20 | 73 68 6f 77 5f 69 6e 69 |Handle |show_ini| |000008d0| 74 3b 0d 09 09 09 09 0d | 09 09 09 09 73 68 6f 77 |t;......|....show| |000008e0| 5f 69 6e 69 74 20 3d 20 | 47 65 74 52 65 73 6f 75 |_init = |GetResou| |000008f0| 72 63 65 28 20 27 43 6f | 64 65 27 2c 20 2d 34 30 |rce( 'Co|de', -40| |00000900| 34 38 20 29 3b 0d 09 09 | 09 09 53 68 6f 77 49 63 |48 );...|..ShowIc| |00000910| 6f 6e 37 20 3d 20 28 70 | 61 73 63 61 6c 20 76 6f |on7 = (p|ascal vo| |00000920| 69 64 20 28 2a 29 28 73 | 68 6f 72 74 2c 20 42 6f |id (*)(s|hort, Bo| |00000930| 6f 6c 65 61 6e 29 29 0d | 09 09 09 09 09 09 09 53 |olean)).|.......S| |00000940| 74 72 69 70 41 64 64 72 | 65 73 73 28 20 2a 73 68 |tripAddr|ess( *sh| |00000950| 6f 77 5f 69 6e 69 74 20 | 29 3b 0d 09 09 09 09 53 |ow_init |);.....S| |00000960| 68 6f 77 49 63 6f 6e 37 | 28 20 69 63 6f 6e 49 44 |howIcon7|( iconID| |00000970| 2c 20 61 64 76 61 6e 63 | 65 20 29 3b 0d 20 2a 2f |, advanc|e );. */| |00000980| 0d 0d 23 64 65 66 69 6e | 65 20 53 45 50 41 52 41 |..#defin|e SEPARA| |00000990| 54 45 5f 43 4f 44 45 09 | 30 0d 0d 0d 23 69 66 20 |TE_CODE.|0...#if | |000009a0| 53 45 50 41 52 41 54 45 | 5f 43 4f 44 45 0d 23 64 |SEPARATE|_CODE.#d| |000009b0| 65 66 69 6e 65 09 09 53 | 68 6f 77 49 63 6f 6e 37 |efine..S|howIcon7| |000009c0| 09 09 6d 61 69 6e 09 2f | 2a 20 4a 57 57 20 2a 2f |..main./|* JWW */| |000009d0| 0d 23 65 6e 64 69 66 0d | 0d 23 69 66 6e 64 65 66 |.#endif.|.#ifndef| |000009e0| 20 6e 69 6c 0d 23 64 65 | 66 69 6e 65 20 6e 69 6c | nil.#de|fine nil| |000009f0| 20 28 28 76 6f 69 64 2a | 29 30 4c 29 0d 23 65 6e | ((void*|)0L).#en| |00000a00| 64 69 66 0d 0d 23 69 66 | 6e 64 65 66 20 74 6f 70 |dif..#if|ndef top| |00000a10| 4c 65 66 74 0d 09 23 64 | 65 66 69 6e 65 20 74 6f |Left..#d|efine to| |00000a20| 70 4c 65 66 74 28 72 29 | 20 28 28 50 6f 69 6e 74 |pLeft(r)| ((Point| |00000a30| 2a 29 26 72 29 5b 30 5d | 29 0d 23 65 6e 64 69 66 |*)&r)[0]|).#endif| |00000a40| 0d 23 69 66 6e 64 65 66 | 20 62 6f 74 52 69 67 68 |.#ifndef| botRigh| |00000a50| 74 0d 09 23 64 65 66 69 | 6e 65 20 62 6f 74 52 69 |t..#defi|ne botRi| |00000a60| 67 68 74 28 72 29 20 28 | 28 50 6f 69 6e 74 2a 29 |ght(r) (|(Point*)| |00000a70| 26 72 29 5b 31 5d 29 0d | 23 65 6e 64 69 66 0d 0d |&r)[1]).|#endif..| |00000a80| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 20 6d |typedef |struct m| |00000a90| 79 51 44 47 6c 6f 62 61 | 6c 73 20 7b 0d 09 51 44 |yQDGloba|ls {..QD| |00000aa0| 47 6c 6f 62 61 6c 73 09 | 74 68 65 47 6c 6f 62 61 |Globals.|theGloba| |00000ab0| 6c 73 3b 0d 09 6c 6f 6e | 67 09 09 65 6e 64 3b 09 |ls;..lon|g..end;.| |00000ac0| 09 2f 2a 20 61 35 20 70 | 6f 69 6e 74 73 20 68 65 |./* a5 p|oints he| |00000ad0| 72 65 20 2a 2f 0d 7d 20 | 6d 79 51 44 47 6c 6f 62 |re */.} |myQDGlob| |00000ae0| 61 6c 73 3b 09 09 09 09 | 2f 2a 20 43 4a 52 20 2a |als;....|/* CJR *| |00000af0| 2f 0d 0d 2f 2a 20 70 72 | 6f 74 6f 74 79 70 65 73 |/../* pr|ototypes| |00000b00| 20 2a 2f 0d 70 61 73 63 | 61 6c 20 76 6f 69 64 20 | */.pasc|al void | |00000b10| 53 68 6f 77 49 63 6f 6e | 37 28 73 68 6f 72 74 20 |ShowIcon|7(short | |00000b20| 69 63 6f 6e 49 64 2c 20 | 42 6f 6f 6c 65 61 6e 20 |iconId, |Boolean | |00000b30| 61 64 76 61 6e 63 65 29 | 3b 0d 73 74 61 74 69 63 |advance)|;.static| |00000b40| 20 76 6f 69 64 20 44 72 | 61 77 42 57 49 63 6f 6e | void Dr|awBWIcon| |00000b50| 28 20 73 68 6f 72 74 20 | 69 63 6f 6e 49 64 2c 20 |( short |iconId, | |00000b60| 52 65 63 74 20 2a 69 63 | 6f 6e 5f 72 65 63 74 2c |Rect *ic|on_rect,| |00000b70| 20 42 6f 6f 6c 65 61 6e | 20 76 69 73 69 62 6c 65 | Boolean| visible| |00000b80| 20 29 3b 0d 73 74 61 74 | 69 63 20 76 6f 69 64 20 | );.stat|ic void | |00000b90| 4e 65 78 74 5f 70 6f 73 | 69 74 69 6f 6e 28 20 76 |Next_pos|ition( v| |00000ba0| 6f 69 64 20 29 3b 0d 73 | 74 61 74 69 63 20 76 6f |oid );.s|tatic vo| |00000bb0| 69 64 20 47 65 74 49 63 | 6f 6e 52 65 63 74 28 20 |id GetIc|onRect( | |00000bc0| 72 65 67 69 73 74 65 72 | 20 52 65 63 74 2a 20 69 |register| Rect* i| |00000bd0| 63 6f 6e 52 65 63 74 2c | 20 52 65 63 74 20 2a 73 |conRect,| Rect *s| |00000be0| 63 72 65 65 6e 5f 72 65 | 63 74 20 29 3b 0d 0d 2f |creen_re|ct );../| |00000bf0| 2a 20 74 68 69 73 20 69 | 73 20 77 68 65 72 65 20 |* this i|s where | |00000c00| 69 74 20 61 6c 6c 20 68 | 61 70 70 65 6e 73 2e 20 |it all h|appens. | |00000c10| 2a 2f 0d 0d 70 61 73 63 | 61 6c 20 76 6f 69 64 20 |*/..pasc|al void | |00000c20| 53 68 6f 77 49 63 6f 6e | 37 28 20 73 68 6f 72 74 |ShowIcon|7( short| |00000c30| 20 69 63 6f 6e 49 64 2c | 20 42 6f 6f 6c 65 61 6e | iconId,| Boolean| |00000c40| 20 61 64 76 61 6e 63 65 | 20 29 0d 7b 0d 09 6c 6f | advance| ).{..lo| |00000c50| 6e 67 09 6f 6c 64 41 35 | 3b 0d 09 6d 79 51 44 47 |ng.oldA5|;..myQDG| |00000c60| 6c 6f 62 61 6c 73 20 71 | 64 3b 09 09 09 09 2f 2a |lobals q|d;..../*| |00000c70| 20 6f 75 72 20 51 44 20 | 67 6c 6f 62 61 6c 73 2e | our QD |globals.| |00000c80| 20 2a 2f 0d 09 53 79 73 | 45 6e 76 52 65 63 20 65 | */..Sys|EnvRec e| |00000c90| 6e 76 69 72 6f 6e 6d 65 | 6e 74 3b 09 09 2f 2a 20 |nvironme|nt;../* | |00000ca0| 6d 61 63 68 69 6e 65 20 | 63 6f 6e 66 69 67 75 72 |machine |configur| |00000cb0| 61 74 69 6f 6e 2e 20 2a | 2f 0d 09 43 47 72 61 66 |ation. *|/..CGraf| |00000cc0| 50 6f 72 74 20 67 70 3b | 09 09 09 09 2f 2a 20 6f |Port gp;|..../* o| |00000cd0| 75 72 20 67 72 61 66 70 | 6f 72 74 2e 20 2a 2f 0d |ur grafp|ort. */.| |00000ce0| 09 52 65 63 74 09 69 63 | 6f 6e 5f 72 65 63 74 3b |.Rect.ic|on_rect;| |00000cf0| 0d 09 4f 53 45 72 72 09 | 65 72 72 3b 0d 09 0d 09 |..OSErr.|err;....| |00000d00| 2f 2a 20 67 65 74 20 61 | 20 76 61 6c 75 65 20 66 |/* get a| value f| |00000d10| 6f 72 20 41 35 2c 20 61 | 20 73 74 72 75 63 74 75 |or A5, a| structu| |00000d20| 72 65 20 74 68 61 74 20 | 6d 69 72 72 6f 72 73 20 |re that |mirrors | |00000d30| 71 64 20 67 6c 6f 62 61 | 6c 73 2e 20 2a 2f 0d 09 |qd globa|ls. */..| |00000d40| 6f 6c 64 41 35 20 3d 20 | 53 65 74 41 35 28 28 6c |oldA5 = |SetA5((l| |00000d50| 6f 6e 67 29 26 71 64 2e | 65 6e 64 29 3b 0d 09 49 |ong)&qd.|end);..I| |00000d60| 6e 69 74 47 72 61 66 28 | 26 71 64 2e 74 68 65 47 |nitGraf(|&qd.theG| |00000d70| 6c 6f 62 61 6c 73 2e 74 | 68 65 50 6f 72 74 29 3b |lobals.t|hePort);| |00000d80| 0d 09 0d 09 2f 2a 20 66 | 69 6e 64 20 6f 75 74 20 |..../* f|ind out | |00000d90| 77 68 61 74 20 6b 69 6e | 64 20 6f 66 20 6d 61 63 |what kin|d of mac| |00000da0| 68 69 6e 65 20 74 68 69 | 73 20 69 73 2e 20 2a 2f |hine thi|s is. */| |00000db0| 0d 09 53 79 73 45 6e 76 | 69 72 6f 6e 73 28 63 75 |..SysEnv|irons(cu| |00000dc0| 72 53 79 73 45 6e 76 56 | 65 72 73 2c 20 26 65 6e |rSysEnvV|ers, &en| |00000dd0| 76 69 72 6f 6e 6d 65 6e | 74 29 3b 0d 0d 09 47 65 |vironmen|t);...Ge| |00000de0| 74 49 63 6f 6e 52 65 63 | 74 28 20 26 69 63 6f 6e |tIconRec|t( &icon| |00000df0| 5f 72 65 63 74 2c 20 26 | 71 64 2e 74 68 65 47 6c |_rect, &|qd.theGl| |00000e00| 6f 62 61 6c 73 2e 73 63 | 72 65 65 6e 42 69 74 73 |obals.sc|reenBits| |00000e10| 2e 62 6f 75 6e 64 73 20 | 29 3b 0d 0d 09 2f 2a 0d |.bounds |);.../*.| |00000e20| 09 09 54 68 65 20 6f 6c | 64 20 49 63 6f 6e 57 72 |..The ol|d IconWr| |00000e30| 61 70 20 49 4e 49 54 20 | 70 61 74 63 68 65 73 20 |ap INIT |patches | |00000e40| 43 6f 70 79 42 69 74 73 | 20 62 75 74 20 64 6f 65 |CopyBits| but doe| |00000e50| 73 20 6e 6f 74 20 6b 6e | 6f 77 20 61 62 6f 75 74 |s not kn|ow about| |00000e60| 0d 09 09 43 6f 70 79 4d | 61 73 6b 20 6f 72 20 49 |...CopyM|ask or I| |00000e70| 63 6f 6e 44 69 73 70 61 | 74 63 68 2e 20 20 53 6f |conDispa|tch. So| |00000e80| 20 69 6e 20 74 68 65 20 | 63 6f 6c 6f 72 20 63 61 | in the |color ca| |00000e90| 73 65 2c 20 77 65 20 64 | 72 61 77 20 74 68 65 0d |se, we d|raw the.| |00000ea0| 09 09 62 6c 61 63 6b 20 | 61 6e 64 20 77 68 69 74 |..black |and whit| |00000eb0| 65 20 69 63 6f 6e 20 77 | 69 74 68 20 61 6e 20 65 |e icon w|ith an e| |00000ec0| 6d 70 74 79 20 6d 61 73 | 6b 20 72 65 67 69 6f 6e |mpty mas|k region| |00000ed0| 2e 0d 09 2a 2f 0d 0d 09 | 69 66 20 28 20 28 65 6e |...*/...|if ( (en| |00000ee0| 76 69 72 6f 6e 6d 65 6e | 74 2e 73 79 73 74 65 6d |vironmen|t.system| |00000ef0| 56 65 72 73 69 6f 6e 20 | 3e 3d 20 30 78 30 37 30 |Version |>= 0x070| |00000f00| 30 29 20 26 26 20 65 6e | 76 69 72 6f 6e 6d 65 6e |0) && en|vironmen| |00000f10| 74 2e 68 61 73 43 6f 6c | 6f 72 51 44 20 29 0d 09 |t.hasCol|orQD )..| |00000f20| 7b 0d 09 09 4f 70 65 6e | 43 50 6f 72 74 28 26 67 |{...Open|CPort(&g| |00000f30| 70 29 3b 0d 09 09 44 72 | 61 77 42 57 49 63 6f 6e |p);...Dr|awBWIcon| |00000f40| 28 20 69 63 6f 6e 49 64 | 2c 20 26 69 63 6f 6e 5f |( iconId|, &icon_| |00000f50| 72 65 63 74 2c 20 66 61 | 6c 73 65 20 29 3b 0d 09 |rect, fa|lse );..| |00000f60| 09 65 72 72 20 3d 20 50 | 6c 6f 74 49 63 6f 6e 49 |.err = P|lotIconI| |00000f70| 44 28 20 26 69 63 6f 6e | 5f 72 65 63 74 2c 20 61 |D( &icon|_rect, a| |00000f80| 74 4e 6f 6e 65 2c 20 74 | 74 4e 6f 6e 65 2c 20 69 |tNone, t|tNone, i| |00000f90| 63 6f 6e 49 64 20 29 3b | 0d 09 09 43 6c 6f 73 65 |conId );|...Close| |00000fa0| 43 50 6f 72 74 28 26 67 | 70 29 3b 0d 09 7d 0d 09 |CPort(&g|p);..}..| |00000fb0| 65 6c 73 65 0d 09 7b 0d | 09 09 4f 70 65 6e 50 6f |else..{.|..OpenPo| |00000fc0| 72 74 28 28 47 72 61 66 | 50 74 72 29 26 67 70 29 |rt((Graf|Ptr)&gp)| |00000fd0| 3b 0d 09 09 44 72 61 77 | 42 57 49 63 6f 6e 28 20 |;...Draw|BWIcon( | |00000fe0| 69 63 6f 6e 49 64 2c 20 | 26 69 63 6f 6e 5f 72 65 |iconId, |&icon_re| |00000ff0| 63 74 2c 20 74 72 75 65 | 20 29 3b 0d 09 09 43 6c |ct, true| );...Cl| |00001000| 6f 73 65 50 6f 72 74 28 | 28 47 72 61 66 50 74 72 |osePort(|(GrafPtr| |00001010| 29 26 67 70 29 3b 0d 09 | 7d 0d 09 0d 09 69 66 20 |)&gp);..|}....if | |00001020| 28 61 64 76 61 6e 63 65 | 29 0d 09 09 4e 65 78 74 |(advance|)...Next| |00001030| 5f 70 6f 73 69 74 69 6f | 6e 28 29 3b 20 2f 2a 20 |_positio|n(); /* | |00001040| 4a 57 57 20 2a 2f 0d 0d | 09 53 65 74 41 35 28 6f |JWW */..|.SetA5(o| |00001050| 6c 64 41 35 29 3b 0d 7d | 0d 0d 2f 2a 0d 09 53 68 |ldA5);.}|../*..Sh| |00001060| 6f 77 49 6e 69 74 27 73 | 20 69 6e 66 6f 72 6d 61 |owInit's| informa| |00001070| 74 69 6f 6e 20 69 73 20 | 6e 65 73 74 6c 65 64 20 |tion is |nestled | |00001080| 61 74 20 74 68 65 20 74 | 61 69 6c 20 65 6e 64 20 |at the t|ail end | |00001090| 6f 66 20 43 75 72 41 70 | 4e 61 6d 65 2e 0d 09 49 |of CurAp|Name...I| |000010a0| 74 20 63 6f 6e 73 69 73 | 74 73 20 6f 66 20 61 20 |t consis|ts of a | |000010b0| 73 68 6f 72 74 20 77 68 | 69 63 68 20 65 6e 63 6f |short wh|ich enco| |000010c0| 64 65 73 20 74 68 65 20 | 6e 65 78 74 20 68 6f 72 |des the |next hor| |000010d0| 69 7a 6f 6e 74 61 6c 20 | 6f 66 66 73 65 74 2c 0d |izontal |offset,.| |000010e0| 09 61 6e 64 20 61 6e 6f | 74 68 65 72 20 73 68 6f |.and ano|ther sho| |000010f0| 72 74 20 77 68 69 63 68 | 20 69 73 20 74 68 61 74 |rt which| is that| |00001100| 20 76 61 6c 75 65 20 63 | 68 65 63 6b 73 75 6d 6d | value c|hecksumm| |00001110| 65 64 20 77 69 74 68 20 | 74 68 65 20 66 75 6e 63 |ed with |the func| |00001120| 74 69 6f 6e 20 62 65 6c | 6f 77 2e 0d 20 2a 2f 0d |tion bel|ow.. */.| |00001130| 0d 23 64 65 66 69 6e 65 | 20 43 75 72 41 70 4e 61 |.#define| CurApNa| |00001140| 6d 65 5f 4c 4d 09 30 78 | 39 31 30 0d 23 64 65 66 |me_LM.0x|910.#def| |00001150| 69 6e 65 20 53 68 6f 77 | 49 4e 49 54 54 61 62 6c |ine Show|INITTabl| |00001160| 65 20 28 28 73 68 6f 72 | 74 2a 29 28 43 75 72 41 |e ((shor|t*)(CurA| |00001170| 70 4e 61 6d 65 5f 4c 4d | 20 2b 20 33 32 20 2d 20 |pName_LM| + 32 - | |00001180| 34 29 29 0d 23 64 65 66 | 69 6e 65 20 43 68 65 63 |4)).#def|ine Chec| |00001190| 6b 53 75 6d 43 6f 6e 73 | 74 20 30 78 31 30 32 31 |kSumCons|t 0x1021| |000011a0| 09 09 2f 2a 20 6d 61 67 | 69 63 20 76 61 6c 75 65 |../* mag|ic value| |000011b0| 20 74 6f 20 63 68 65 63 | 6b 2d 73 75 6d 20 77 69 | to chec|k-sum wi| |000011c0| 74 68 2e 20 2a 2f 0d 0d | 23 64 65 66 69 6e 65 20 |th. */..|#define | |000011d0| 49 6e 69 74 69 61 6c 58 | 50 6f 73 69 74 69 6f 6e |InitialX|Position| |000011e0| 20 38 09 09 09 2f 2a 20 | 69 6e 69 74 69 61 6c 20 | 8.../* |initial | |000011f0| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 6f 66 66 73 65 |horizont|al offse| |00001200| 74 2e 20 2a 2f 0d 23 64 | 65 66 69 6e 65 20 59 4f |t. */.#d|efine YO| |00001210| 66 66 73 65 74 09 09 09 | 34 30 09 09 09 2f 2a 20 |ffset...|40.../* | |00001220| 63 6f 6e 73 74 61 6e 74 | 20 66 72 6f 6d 20 62 6f |constant| from bo| |00001230| 74 74 6f 6d 20 74 6f 20 | 70 6c 61 63 65 20 74 68 |ttom to |place th| |00001240| 65 20 69 63 6f 6e 2e 20 | 2a 2f 0d 23 64 65 66 69 |e icon. |*/.#defi| |00001250| 6e 65 20 58 4f 66 66 73 | 65 74 09 09 09 34 30 09 |ne XOffs|et...40.| |00001260| 09 09 2f 2a 20 61 6d 6f | 75 6e 74 20 74 6f 20 63 |../* amo|unt to c| |00001270| 68 61 6e 67 65 20 69 74 | 20 62 79 2e 20 2a 2f 0d |hange it| by. */.| |00001280| 23 64 65 66 69 6e 65 20 | 49 43 4f 4e 5f 57 49 44 |#define |ICON_WID| |00001290| 54 48 09 09 33 32 0d 23 | 64 65 66 69 6e 65 20 6b |TH..32.#|define k| |000012a0| 44 65 66 61 75 6c 74 52 | 65 73 20 30 78 30 30 34 |DefaultR|es 0x004| |000012b0| 38 30 30 30 30 20 2f 2a | 20 44 65 66 61 75 6c 74 |80000 /*| Default| |000012c0| 20 72 65 73 6f 6c 75 74 | 69 6f 6e 20 69 73 20 37 | resolut|ion is 7| |000012d0| 32 20 44 50 49 3b 20 46 | 69 78 65 64 20 74 79 70 |2 DPI; F|ixed typ| |000012e0| 65 20 2a 2f 0d 0d 2f 2a | 20 43 68 65 63 6b 53 75 |e */../*| CheckSu| |000012f0| 6d 28 29 20 63 6f 6d 70 | 75 74 65 73 20 74 68 65 |m() comp|utes the| |00001300| 20 6d 61 67 69 63 20 76 | 61 6c 75 65 20 74 6f 20 | magic v|alue to | |00001310| 64 65 74 65 72 6d 69 6e | 65 20 69 66 20 53 68 6f |determin|e if Sho| |00001320| 77 49 6e 69 74 27 73 20 | 68 61 76 65 20 72 75 6e |wInit's |have run| |00001330| 20 61 6c 72 65 61 64 79 | 2e 20 2a 2f 0d 0d 73 74 | already|. */..st| |00001340| 61 74 69 63 20 73 68 6f | 72 74 20 43 68 65 63 6b |atic sho|rt Check| |00001350| 53 75 6d 28 73 68 6f 72 | 74 20 78 29 0d 7b 0d 09 |Sum(shor|t x).{..| |00001360| 72 65 67 69 73 74 65 72 | 20 75 6e 73 69 67 6e 65 |register| unsigne| |00001370| 64 20 73 68 6f 72 74 20 | 79 20 3d 20 78 3b 0d 09 |d short |y = x;..| |00001380| 79 20 3d 20 28 20 79 20 | 3e 3e 20 31 35 20 29 20 |y = ( y |>> 15 ) | |00001390| 2b 20 28 79 20 3c 3c 20 | 31 29 3b 09 2f 2a 20 43 |+ (y << |1);./* C| |000013a0| 4a 52 20 2d 2d 20 77 61 | 73 20 61 73 6d 20 7b 20 |JR -- wa|s asm { | |000013b0| 72 6f 6c 2e 77 20 23 31 | 2c 20 78 20 7d 20 2a 2f |rol.w #1|, x } */| |000013c0| 0d 09 72 65 74 75 72 6e | 20 28 79 20 5e 20 43 68 |..return| (y ^ Ch| |000013d0| 65 63 6b 53 75 6d 43 6f | 6e 73 74 29 3b 0d 7d 0d |eckSumCo|nst);.}.| |000013e0| 0d 2f 2a 0d 09 47 65 74 | 49 63 6f 6e 52 65 63 74 |./*..Get|IconRect| |000013f0| 28 29 20 67 65 6e 65 72 | 61 74 65 73 20 61 6e 20 |() gener|ates an | |00001400| 61 70 70 72 6f 70 72 69 | 61 74 65 20 72 65 63 74 |appropri|ate rect| |00001410| 61 6e 67 6c 65 20 74 6f | 20 64 69 73 70 6c 61 79 |angle to| display| |00001420| 20 74 68 65 0d 09 6e 65 | 78 74 20 49 4e 49 54 27 | the..ne|xt INIT'| |00001430| 73 20 69 63 6f 6e 20 69 | 6e 2e 0d 09 49 74 20 69 |s icon i|n...It i| |00001440| 73 20 61 6c 73 6f 20 72 | 65 73 70 6f 6e 73 69 62 |s also r|esponsib| |00001450| 6c 65 20 66 6f 72 20 75 | 70 64 61 74 69 6e 67 20 |le for u|pdating | |00001460| 74 68 65 20 68 6f 72 69 | 7a 6f 6e 74 61 6c 0d 09 |the hori|zontal..| |00001470| 70 6f 73 69 74 69 6f 6e | 20 69 6e 20 6c 6f 77 20 |position| in low | |00001480| 6d 65 6d 6f 72 79 2e 20 | 20 54 68 69 73 20 69 73 |memory. | This is| |00001490| 20 61 20 64 65 70 61 72 | 74 75 72 65 20 66 72 6f | a depar|ture fro| |000014a0| 6d 0d 09 74 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |m..the o|riginal | |000014b0| 53 68 6f 77 49 6e 69 74 | 20 63 6f 64 65 2c 20 77 |ShowInit| code, w| |000014c0| 68 69 63 68 20 75 70 64 | 61 74 65 73 20 6c 6f 77 |hich upd|ates low| |000014d0| 0d 09 6d 65 6d 6f 72 79 | 20 41 46 54 45 52 20 64 |..memory| AFTER d| |000014e0| 69 73 70 6c 61 79 69 6e | 67 20 74 68 65 20 69 63 |isplayin|g the ic| |000014f0| 6f 6e 2e 20 2d 2d 20 63 | 68 61 6e 67 65 64 20 62 |on. -- c|hanged b| |00001500| 79 20 4a 57 57 0d 09 54 | 68 69 73 20 63 6f 64 65 |y JWW..T|his code| |00001510| 20 77 6f 6e 27 74 20 67 | 65 6e 65 72 61 74 65 20 | won't g|enerate | |00001520| 61 6e 20 69 63 6f 6e 20 | 70 6f 73 69 74 69 6f 6e |an icon |position| |00001530| 20 75 6e 74 69 6c 20 69 | 74 20 69 73 20 63 65 72 | until i|t is cer| |00001540| 74 61 69 6e 20 74 68 61 | 74 20 74 68 65 20 69 63 |tain tha|t the ic| |00001550| 6f 6e 20 63 61 6e 20 62 | 65 20 6c 6f 61 64 65 64 |on can b|e loaded| |00001560| 2c 20 73 6f 20 74 68 65 | 0d 09 73 61 6d 65 20 62 |, so the|..same b| |00001570| 65 68 61 76 69 6f 75 72 | 20 6f 63 63 75 72 73 2e |ehaviour| occurs.| |00001580| 0d 09 0d 09 54 68 69 73 | 20 72 6f 75 74 69 6e 65 |....This| routine| |00001590| 20 61 6c 73 6f 20 67 65 | 6e 65 72 61 74 65 73 20 | also ge|nerates | |000015a0| 61 20 72 65 63 74 61 6e | 67 6c 65 20 77 68 69 63 |a rectan|gle whic| |000015b0| 68 20 69 73 20 67 75 61 | 72 61 6e 74 65 65 64 20 |h is gua|ranteed | |000015c0| 74 6f 20 62 65 20 6f 6e | 73 63 72 65 65 6e 2e 20 |to be on|screen. | |000015d0| 20 49 74 0d 09 64 6f 65 | 73 20 74 68 69 73 20 62 | It..doe|s this b| |000015e0| 79 20 74 61 6b 69 6e 67 | 20 74 68 65 20 68 6f 72 |y taking| the hor| |000015f0| 69 7a 6f 6e 74 61 6c 20 | 6f 66 66 73 65 74 20 6d |izontal |offset m| |00001600| 6f 64 75 6c 6f 20 74 68 | 65 20 73 63 72 65 65 6e |odulo th|e screen| |00001610| 20 77 69 64 74 68 20 74 | 6f 20 67 65 6e 65 72 61 | width t|o genera| |00001620| 74 65 0d 09 74 68 65 20 | 68 6f 72 69 7a 6f 6e 74 |te..the |horizont| |00001630| 61 6c 20 70 6f 73 69 74 | 69 6f 6e 20 6f 66 20 74 |al posit|ion of t| |00001640| 68 65 20 69 63 6f 6e 2c | 20 61 6e 64 20 74 68 65 |he icon,| and the| |00001650| 20 6f 66 66 73 65 74 20 | 64 69 76 69 64 65 64 20 | offset |divided | |00001660| 62 79 20 74 68 65 20 73 | 63 72 65 65 6e 0d 09 77 |by the s|creen..w| |00001670| 69 64 74 68 20 74 6f 20 | 67 65 6e 65 72 61 74 65 |idth to |generate| |00001680| 20 74 68 65 20 70 72 6f | 70 65 72 20 72 6f 77 2e | the pro|per row.| |00001690| 0d 20 2a 2f 0d 0d 73 74 | 61 74 69 63 20 76 6f 69 |. */..st|atic voi| |000016a0| 64 20 47 65 74 49 63 6f | 6e 52 65 63 74 28 72 65 |d GetIco|nRect(re| |000016b0| 67 69 73 74 65 72 20 52 | 65 63 74 2a 20 69 63 6f |gister R|ect* ico| |000016c0| 6e 52 65 63 74 2c 20 52 | 65 63 74 20 2a 73 63 72 |nRect, R|ect *scr| |000016d0| 65 65 6e 5f 72 65 63 74 | 20 29 0d 7b 0d 09 72 65 |een_rect| ).{..re| |000016e0| 67 69 73 74 65 72 20 73 | 68 6f 72 74 20 73 63 72 |gister s|hort scr| |000016f0| 65 65 6e 57 69 64 74 68 | 3b 0d 09 0d 09 73 63 72 |eenWidth|;....scr| |00001700| 65 65 6e 57 69 64 74 68 | 20 3d 20 73 63 72 65 65 |eenWidth| = scree| |00001710| 6e 5f 72 65 63 74 2d 3e | 72 69 67 68 74 20 2d 20 |n_rect->|right - | |00001720| 73 63 72 65 65 6e 5f 72 | 65 63 74 2d 3e 6c 65 66 |screen_r|ect->lef| |00001730| 74 3b 0d 09 73 63 72 65 | 65 6e 57 69 64 74 68 20 |t;..scre|enWidth | |00001740| 2d 3d 20 73 63 72 65 65 | 6e 57 69 64 74 68 20 25 |-= scree|nWidth %| |00001750| 20 58 4f 66 66 73 65 74 | 3b 0d 09 2f 2a 20 69 66 | XOffset|;../* if| |00001760| 20 77 65 20 61 72 65 20 | 74 68 65 20 66 69 72 73 | we are |the firs| |00001770| 74 20 49 4e 49 54 20 74 | 6f 20 72 75 6e 20 77 65 |t INIT t|o run we| |00001780| 20 6e 65 65 64 20 74 6f | 20 69 6e 69 74 69 61 6c | need to| initial| |00001790| 69 7a 65 20 74 68 65 20 | 68 6f 72 69 7a 6f 6e 74 |ize the |horizont| |000017a0| 61 6c 20 76 61 6c 75 65 | 2e 20 2a 2f 0d 09 69 66 |al value|. */..if| |000017b0| 20 28 43 68 65 63 6b 53 | 75 6d 28 53 68 6f 77 49 | (CheckS|um(ShowI| |000017c0| 4e 49 54 54 61 62 6c 65 | 5b 30 5d 29 20 21 3d 20 |NITTable|[0]) != | |000017d0| 53 68 6f 77 49 4e 49 54 | 54 61 62 6c 65 5b 31 5d |ShowINIT|Table[1]| |000017e0| 29 0d 09 09 53 68 6f 77 | 49 4e 49 54 54 61 62 6c |)...Show|INITTabl| |000017f0| 65 5b 30 5d 20 3d 20 49 | 6e 69 74 69 61 6c 58 50 |e[0] = I|nitialXP| |00001800| 6f 73 69 74 69 6f 6e 3b | 0d 09 0d 09 2f 2a 20 63 |osition;|..../* c| |00001810| 6f 6d 70 75 74 65 20 74 | 6f 70 20 6c 65 66 74 20 |ompute t|op left | |00001820| 6f 66 20 69 63 6f 6e 27 | 73 20 72 65 63 74 2e 20 |of icon'|s rect. | |00001830| 2a 2f 0d 09 69 63 6f 6e | 52 65 63 74 2d 3e 6c 65 |*/..icon|Rect->le| |00001840| 66 74 20 3d 20 28 53 68 | 6f 77 49 4e 49 54 54 61 |ft = (Sh|owINITTa| |00001850| 62 6c 65 5b 30 5d 20 25 | 20 73 63 72 65 65 6e 57 |ble[0] %| screenW| |00001860| 69 64 74 68 29 3b 0d 09 | 69 63 6f 6e 52 65 63 74 |idth);..|iconRect| |00001870| 2d 3e 74 6f 70 20 3d 20 | 73 63 72 65 65 6e 5f 72 |->top = |screen_r| |00001880| 65 63 74 2d 3e 62 6f 74 | 74 6f 6d 20 2d 0d 09 09 |ect->bot|tom -...| |00001890| 59 4f 66 66 73 65 74 20 | 2a 20 28 31 20 2b 20 28 |YOffset |* (1 + (| |000018a0| 53 68 6f 77 49 4e 49 54 | 54 61 62 6c 65 5b 30 5d |ShowINIT|Table[0]| |000018b0| 20 2f 20 73 63 72 65 65 | 6e 57 69 64 74 68 29 29 | / scree|nWidth))| |000018c0| 3b 0d 09 69 63 6f 6e 52 | 65 63 74 2d 3e 72 69 67 |;..iconR|ect->rig| |000018d0| 68 74 20 3d 20 69 63 6f | 6e 52 65 63 74 2d 3e 6c |ht = ico|nRect->l| |000018e0| 65 66 74 20 2b 20 33 32 | 3b 0d 09 69 63 6f 6e 52 |eft + 32|;..iconR| |000018f0| 65 63 74 2d 3e 62 6f 74 | 74 6f 6d 20 3d 20 69 63 |ect->bot|tom = ic| |00001900| 6f 6e 52 65 63 74 2d 3e | 74 6f 70 20 2b 20 33 32 |onRect->|top + 32| |00001910| 3b 0d 09 0d 7d 0d 0d 2f | 2a 0d 09 4a 57 57 3a 20 |;...}../|*..JWW: | |00001920| 49 6e 20 42 65 61 72 64 | 27 73 20 6f 72 69 67 69 |In Beard|'s origi| |00001930| 6e 61 6c 20 76 65 72 73 | 69 6f 6e 2c 20 74 68 69 |nal vers|ion, thi| |00001940| 73 20 77 61 73 20 64 6f | 6e 65 20 61 74 20 74 68 |s was do|ne at th| |00001950| 65 20 65 6e 64 20 6f 66 | 0d 09 47 65 74 49 63 6f |e end of|..GetIco| |00001960| 6e 52 65 63 74 2e 20 54 | 68 61 74 20 63 61 75 73 |nRect. T|hat caus| |00001970| 65 64 20 69 6e 63 6f 72 | 72 65 63 74 20 62 65 68 |ed incor|rect beh| |00001980| 61 76 69 6f 72 20 77 68 | 65 6e 20 49 63 6f 6e 57 |avior wh|en IconW| |00001990| 72 61 70 20 31 2e 32 20 | 77 61 73 0d 09 75 73 65 |rap 1.2 |was..use| |000019a0| 64 20 74 6f 20 77 72 61 | 70 20 69 63 6f 6e 73 2e |d to wra|p icons.| |000019b0| 20 20 4e 61 6d 65 6c 79 | 2c 20 69 66 20 61 6e 20 | Namely|, if an | |000019c0| 49 4e 49 54 20 75 73 69 | 6e 67 20 74 68 61 74 20 |INIT usi|ng that | |000019d0| 76 65 72 73 69 6f 6e 20 | 6f 66 0d 09 53 68 6f 77 |version |of..Show| |000019e0| 49 63 6f 6e 46 61 6d 69 | 6c 79 20 77 61 73 20 74 |IconFami|ly was t| |000019f0| 68 65 20 66 69 72 73 74 | 20 69 6e 20 61 20 72 6f |he first| in a ro| |00001a00| 77 2c 20 74 68 65 6e 20 | 74 68 65 20 73 65 63 6f |w, then |the seco| |00001a10| 6e 64 20 69 63 6f 6e 20 | 69 6e 20 74 68 61 74 0d |nd icon |in that.| |00001a20| 09 72 6f 77 20 77 6f 75 | 6c 64 20 6c 61 6e 64 20 |.row wou|ld land | |00001a30| 6f 6e 20 74 6f 70 20 6f | 66 20 69 74 2e 0d 2a 2f |on top o|f it..*/| |00001a40| 0d 73 74 61 74 69 63 20 | 76 6f 69 64 20 4e 65 78 |.static |void Nex| |00001a50| 74 5f 70 6f 73 69 74 69 | 6f 6e 28 20 76 6f 69 64 |t_positi|on( void| |00001a60| 20 29 0d 7b 0d 09 2f 2a | 20 61 64 76 61 6e 63 65 | ).{../*| advance| |00001a70| 20 74 68 65 20 70 6f 73 | 69 74 69 6f 6e 20 66 6f | the pos|ition fo| |00001a80| 72 20 74 68 65 20 6e 65 | 78 74 20 69 63 6f 6e 2e |r the ne|xt icon.| |00001a90| 20 2a 2f 0d 09 53 68 6f | 77 49 4e 49 54 54 61 62 | */..Sho|wINITTab| |00001aa0| 6c 65 5b 30 5d 20 2b 3d | 20 58 4f 66 66 73 65 74 |le[0] +=| XOffset| |00001ab0| 3b 0d 09 0d 09 2f 2a 20 | 72 65 63 6f 6d 70 75 74 |;..../* |recomput| |00001ac0| 65 20 74 68 65 20 63 68 | 65 63 6b 73 75 6d 2e 20 |e the ch|ecksum. | |00001ad0| 2a 2f 0d 09 53 68 6f 77 | 49 4e 49 54 54 61 62 6c |*/..Show|INITTabl| |00001ae0| 65 5b 31 5d 20 3d 20 43 | 68 65 63 6b 53 75 6d 28 |e[1] = C|heckSum(| |00001af0| 53 68 6f 77 49 4e 49 54 | 54 61 62 6c 65 5b 30 5d |ShowINIT|Table[0]| |00001b00| 29 3b 09 0d 7d 0d 0d 2f | 2a 20 44 72 61 77 42 57 |);..}../|* DrawBW| |00001b10| 49 63 6f 6e 28 29 20 64 | 72 61 77 73 20 74 68 65 |Icon() d|raws the| |00001b20| 20 27 49 43 4e 23 27 20 | 6d 65 6d 62 65 72 20 6f | 'ICN#' |member o| |00001b30| 66 20 74 68 65 20 69 63 | 6f 6e 20 66 61 6d 69 6c |f the ic|on famil| |00001b40| 79 2e 20 2a 2f 0d 0d 76 | 6f 69 64 20 44 72 61 77 |y. */..v|oid Draw| |00001b50| 42 57 49 63 6f 6e 28 20 | 73 68 6f 72 74 20 69 63 |BWIcon( |short ic| |00001b60| 6f 6e 49 64 2c 20 52 65 | 63 74 20 2a 69 63 6f 6e |onId, Re|ct *icon| |00001b70| 5f 72 65 63 74 2c 20 42 | 6f 6f 6c 65 61 6e 20 76 |_rect, B|oolean v| |00001b80| 69 73 69 62 6c 65 20 29 | 0d 7b 0d 09 48 61 6e 64 |isible )|.{..Hand| |00001b90| 6c 65 09 09 69 63 6f 6e | 3b 0d 09 42 69 74 4d 61 |le..icon|;..BitMa| |00001ba0| 70 09 09 73 6f 75 72 63 | 65 2c 20 64 65 73 74 69 |p..sourc|e, desti| |00001bb0| 6e 61 74 69 6f 6e 3b 0d | 09 52 67 6e 48 61 6e 64 |nation;.|.RgnHand| |00001bc0| 6c 65 09 65 6d 70 74 79 | 5f 6d 61 73 6b 3b 0d 09 |le.empty|_mask;..| |00001bd0| 47 72 61 66 50 74 72 09 | 09 70 6f 72 74 3b 0d 09 |GrafPtr.|.port;..| |00001be0| 0d 09 69 63 6f 6e 20 3d | 20 28 48 61 6e 64 6c 65 |..icon =| (Handle| |00001bf0| 29 47 65 74 31 52 65 73 | 6f 75 72 63 65 28 27 49 |)Get1Res|ource('I| |00001c00| 43 4e 23 27 2c 20 69 63 | 6f 6e 49 64 29 3b 0d 09 |CN#', ic|onId);..| |00001c10| 69 66 20 28 21 69 63 6f | 6e 29 0d 09 09 72 65 74 |if (!ico|n)...ret| |00001c20| 75 72 6e 3b 0d 09 48 4c | 6f 63 6b 28 69 63 6f 6e |urn;..HL|ock(icon| |00001c30| 29 3b 0d 09 0d 09 2f 2a | 20 70 72 65 70 61 72 65 |);..../*| prepare| |00001c40| 20 74 68 65 20 73 6f 75 | 72 63 65 20 61 6e 64 20 | the sou|rce and | |00001c50| 64 65 73 74 69 6e 61 74 | 69 6f 6e 20 62 69 74 6d |destinat|ion bitm| |00001c60| 61 70 73 2e 20 2a 2f 0d | 09 73 6f 75 72 63 65 2e |aps. */.|.source.| |00001c70| 62 61 73 65 41 64 64 72 | 20 3d 20 2a 69 63 6f 6e |baseAddr| = *icon| |00001c80| 20 2b 20 31 32 38 3b 09 | 09 09 09 09 2f 2a 20 6d | + 128;.|..../* m| |00001c90| 61 73 6b 20 61 64 64 72 | 65 73 73 2e 20 2a 2f 0d |ask addr|ess. */.| |00001ca0| 09 73 6f 75 72 63 65 2e | 72 6f 77 42 79 74 65 73 |.source.|rowBytes| |00001cb0| 20 3d 20 34 3b 0d 09 53 | 65 74 52 65 63 74 28 26 | = 4;..S|etRect(&| |00001cc0| 73 6f 75 72 63 65 2e 62 | 6f 75 6e 64 73 2c 20 30 |source.b|ounds, 0| |00001cd0| 2c 20 30 2c 20 33 32 2c | 20 33 32 29 3b 0d 09 47 |, 0, 32,| 32);..G| |00001ce0| 65 74 50 6f 72 74 28 20 | 26 70 6f 72 74 20 29 3b |etPort( |&port );| |00001cf0| 0d 09 64 65 73 74 69 6e | 61 74 69 6f 6e 20 3d 20 |..destin|ation = | |00001d00| 28 28 47 72 61 66 50 74 | 72 29 70 6f 72 74 29 2d |((GrafPt|r)port)-| |00001d10| 3e 70 6f 72 74 42 69 74 | 73 3b 0d 09 65 6d 70 74 |>portBit|s;..empt| |00001d20| 79 5f 6d 61 73 6b 20 3d | 20 76 69 73 69 62 6c 65 |y_mask =| visible| |00001d30| 3f 20 6e 69 6c 20 3a 20 | 4e 65 77 52 67 6e 28 29 |? nil : |NewRgn()| |00001d40| 3b 0d 09 0d 09 2f 2a 20 | 74 72 61 6e 73 66 65 72 |;..../* |transfer| |00001d50| 20 74 68 65 20 6d 61 73 | 6b 2e 20 2a 2f 0d 09 43 | the mas|k. */..C| |00001d60| 6f 70 79 42 69 74 73 28 | 26 73 6f 75 72 63 65 2c |opyBits(|&source,| |00001d70| 20 26 64 65 73 74 69 6e | 61 74 69 6f 6e 2c 20 26 | &destin|ation, &| |00001d80| 73 6f 75 72 63 65 2e 62 | 6f 75 6e 64 73 2c 20 69 |source.b|ounds, i| |00001d90| 63 6f 6e 5f 72 65 63 74 | 2c 0d 09 09 73 72 63 42 |con_rect|,...srcB| |00001da0| 69 63 2c 20 65 6d 70 74 | 79 5f 6d 61 73 6b 29 3b |ic, empt|y_mask);| |00001db0| 0d 09 0d 09 2f 2a 20 61 | 6e 64 20 74 68 65 20 69 |..../* a|nd the i| |00001dc0| 63 6f 6e 2e 20 2a 2f 0d | 09 73 6f 75 72 63 65 2e |con. */.|.source.| |00001dd0| 62 61 73 65 41 64 64 72 | 20 3d 20 2a 69 63 6f 6e |baseAddr| = *icon| |00001de0| 3b 09 0d 09 43 6f 70 79 | 42 69 74 73 28 26 73 6f |;...Copy|Bits(&so| |00001df0| 75 72 63 65 2c 20 26 64 | 65 73 74 69 6e 61 74 69 |urce, &d|estinati| |00001e00| 6f 6e 2c 20 26 73 6f 75 | 72 63 65 2e 62 6f 75 6e |on, &sou|rce.boun| |00001e10| 64 73 2c 20 69 63 6f 6e | 5f 72 65 63 74 2c 0d 09 |ds, icon|_rect,..| |00001e20| 09 73 72 63 4f 72 2c 20 | 65 6d 70 74 79 5f 6d 61 |.srcOr, |empty_ma| |00001e30| 73 6b 29 3b 0d 09 0d 09 | 69 66 20 28 65 6d 70 74 |sk);....|if (empt| |00001e40| 79 5f 6d 61 73 6b 29 20 | 44 69 73 70 6f 73 65 52 |y_mask) |DisposeR| |00001e50| 67 6e 28 20 65 6d 70 74 | 79 5f 6d 61 73 6b 20 29 |gn( empt|y_mask )| |00001e60| 3b 0d 7d 0d 00 00 00 00 | 00 00 00 00 00 00 00 00 |;.}.....|........| |00001e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00001e80| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>| |00001e90| 2c 20 30 78 30 32 32 38 | 2c 20 30 78 30 30 31 38 |, 0x0228|, 0x0018| |00001ea0| 2c 20 30 78 41 38 30 30 | 29 3b 0d 65 78 74 65 72 |, 0xA800|);.exter| |00001eb0| 0b 53 68 6f 77 49 63 6f | 6e 37 2e 63 02 00 00 00 |.ShowIco|n7.c....| |00001ec0| 50 61 72 74 53 49 54 21 | 00 00 00 00 00 00 00 00 |PartSIT!|........| |00001ed0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......| |00001ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00001ef0| 00 00 ab 1e 2a 51 00 00 | 00 00 00 00 01 ac 32 32 |....*Q..|......22| |00001f00| 43 2c 20 30 78 30 30 31 | 38 2c 20 30 78 41 38 30 |C, 0x001|8, 0xA80| |00001f10| 30 29 3b 0d 65 78 74 65 | 72 6e 20 70 61 73 63 61 |0);.exte|rn pasca| |00001f20| 6c 20 4f 53 45 72 72 20 | 53 65 74 44 65 66 61 75 |l OSErr |SetDefau| |00001f30| 6c 74 4f 75 74 70 75 74 | 56 6f 6c 75 6d 65 28 6c |ltOutput|Volume(l| |00001f40| 6f 6e 67 20 6c 65 76 65 | 6c 29 0d 20 46 4f 55 52 |ong leve|l). FOUR| |00001f50| 57 4f 52 44 49 4e 4c 49 | 4e 45 28 30 78 32 30 33 |WORDINLI|NE(0x203| |00001f60| 43 2c 20 30 78 30 32 33 | 30 2c 20 30 78 30 30 31 |C, 0x023|0, 0x001| |00001f70| 38 2c 20 30 78 41 38 30 | 30 29 3b 0d 65 78 74 65 |8, 0xA80|0);.exte| |00001f80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 63 6f 6e |...H..Mo|naco.con| |00001f90| 00 9f a1 20 0d 0d 2f 2a | 0d 09 53 68 6f 77 49 63 |... ../*|..ShowIc| |00001fa0| 6f 6e 37 2e 63 0d 00 06 | 00 04 00 35 01 a7 02 ed |on7.c...|...5....| |00001fb0| 03 8f 00 35 01 a7 02 ed | 03 8f ab 19 dc 39 00 00 |...5....|.....9..| |00001fc0| 00 52 00 00 00 52 00 00 | 00 00 01 00 00 00 00 1e |.R...R..|........| |00001fd0| 00 35 01 a7 02 ed 03 8f | 00 35 01 a7 02 ed 03 8f |.5......|.5......| |00001fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00001ff0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 94 |.....n..|.n...>..| |00002000| cc 98 19 58 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |...X....|.>..MPSR| |00002010| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........| |00002020| 03 f0 ff ff 00 00 00 4c | 00 97 2a 28 00 00 00 00 |.......L|..*(....| |00002030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| +--------+-------------------------+-------------------------+--------+--------+